package www.albertzhe.askForLeave.responsibility;

import www.albertzhe.askForLeave.Chain;
import www.albertzhe.askForLeave.Ratify;
import www.albertzhe.askForLeave.impl.Request;
import www.albertzhe.askForLeave.impl.Result;

/**
 * 部门领导（级别最大）
 * 
 */
public class DepartmentHeader implements Ratify {

    @Override
    public Result deal(Chain chain) {
        Request request = chain.request();
        System.out.println("“部门领导” 正在查看请求：" + request.toString());
        
        if (request.getDays() > 7) {
            return new Result(false, "你这个完全没必要");
        } else {
            return new Result(true, "DepartmentHeader：不要着急，把事情处理完再回来！");
        }
    }

}
